import java.util.Scanner;
import java.util.StringJoiner;

public class StringJoinerdemo2 {
    public static void main(String[] args) {
        //创建
        StringJoiner sj=new StringJoiner(", ","[","]");
        sj.add("aaa").add("bbb").add("ccc");

        int len=sj.length();
        System.out.println(sj);
        System.out.println(len);
    }
}
